package org.example.heterogeneous;

import lombok.Data;

@Data
public class Node implements Comparable<Node> {

    private Integer id;

    private Integer degree;

    private Integer type;

    private String content;

    public Node() {
    }

    public Node(Integer id, Integer degree) {
        this.id = id;
        this.degree = degree;
    }

    public Node(Integer id, Integer type, String content) {
        this.id = id;
        this.type = type;
        this.content = content;
    }

    public Node(Integer id, Integer type, String content, Integer degree) {
        this.id = id;
        this.type = type;
        this.content = content;
        this.degree = degree;
    }

    @Override
    public int compareTo(Node o) {
        return this.degree.compareTo(o.degree);
    }

    @Override
    public String toString() {
        return "{id=" + id + ", type=" + type + ", content=" + content + ", degree=" + degree + "}";
    }

}
